<?php

include '../DB/dbConnection.php';

$result=array();

if ($_POST){
		
	$query = "UPDATE exam_config SET test=?,main=? WHERE school_id=?";
	
	$stmt = $conn->prepare($query);
	$stmt->bind_param("iii",$_POST['test'],$_POST['main'],$_POST['school_id']);
	$success = $stmt->execute();
	$stmt->close();
	$conn->close();
	
	if($success)
		$result['error']='false';
	else
		$result['error']='true';
}
else
{
	$result['error']='true';
}

echo json_encode($result);

?> 
